﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Sagacity.NC.Web.FormForm;

namespace Sagacity.NC.Web.BaokaoManager.PSchool
{
    public partial class PSchoolOtherInfo : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int resourceId = Request.QueryString["ResourceId"] == null ? 0 : int.Parse(Request.QueryString["ResourceId"]);
            int showStyle = Request.QueryString["showStyle"] == null ? 0 : int.Parse(Request.QueryString["showStyle"]);
            int schoolId = Request.QueryString["SchoolId"] == null ? 0 : int.Parse(Request.QueryString["SchoolId"]);
            int controlType = Request.QueryString["controlType"] == null ? 0 : int.Parse(Request.QueryString["controlType"]);
            Sagacity.Entity.Query.ParameterInfo param = new Sagacity.Entity.Query.ParameterInfo() { ParameterName = "PROFESSIONALSCHOOL_ID", RealValue = schoolId };

            this.TabFormCommon1.ModelParams.Add(param);
            this.TabFormCommon1.CurrentUser = CurrentUser;
            this.TabFormCommon1.ShowPlan = (ShowPlan)showStyle;
            this.TabFormCommon1.ResourceId = resourceId;
            this.TabFormCommon1.AddFields.Add("PROFESSIONALSCHOOL_ID", schoolId);

            if (controlType != 1)
                this.TabFormCommon1.ReadOnly = true;
        }
    }
}